package com.kailong.servlet.student;

import com.kailong.dao.ManageReserve;
import com.kailong.dao.admin.ManageSeatDao;
import com.kailong.pojo.Reserve;
import com.kailong.pojo.Seat;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
@WebServlet("/student/reserveSelect")
public class ReserveSelect extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        HttpSession session = req.getSession();
        String sno = (String)session.getAttribute("sno");
        ArrayList<Reserve> list = ManageReserve.selectAll(sno);
        req.setAttribute("reservetlist",list);
        String isLogin = (String) session.getAttribute("isLogin");
        req.getRequestDispatcher("studentSearchReserve.jsp").forward(req, resp);

    }
}
